#ifndef RGBDFrame_H_
#define RGBDFrame_H_

//OpenCV
#include "cv.h"
#include "highgui.h"
//Other
#include <stdio.h>
#include <string.h>
#include <pcl/io/pcd_io.h>
#include <pcl/point_types.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/features/integral_image_normal.h>
//#include "RGBDCamera.h"
#include <Eigen/Core>
#include "KeyPointSet.h"

using namespace std;

class RGBDCamera;
class RGBDFrame
{
	public:
	string rgb_path;
	string depth_path;
	
	RGBDCamera * camera;
	int id_number;
	double timing;
	
	int width;
	int height;
	
	FeatureDescriptor * image_descriptor;
	KeyPointSet * keypoints;
	KeyPointSet ** cluster_keypoints;
	int nr_clusters;
	pcl::PointCloud<pcl::PointXYZRGB>::Ptr keypoint_cloud;
	
	RGBDFrame(RGBDCamera * camera);
	RGBDFrame();
	~RGBDFrame();
	void store(string path);
	void load(string path, RGBDCamera * used_camera);
	void print();
	void showFrame();
	void setupKeyPointData();
	void setupImageDescriptor();
	double compareToFrame(RGBDFrame * frame);
	pcl::PointCloud<pcl::PointXYZRGB>::Ptr getCloud();
	RGBDFrame * clone();
};

#endif
